package org.bookie.init;

import java.util.Properties;

import org.apache.hivemind.Registry;

/**
 * Common IF for all initialization and self test tasks
 * 
 * @author zubairov
 *
 */
public interface InitTask {

	/**
	 * Checks values and return properties that will be shown to user.
	 * Called first before {@link #execute(Registry)} method
	 * @param registry
	 * @return
	 * @throws Exception
	 */
	public Properties check(Registry registry) throws Exception;
	
	/**
	 * Execute changes based on the analyze phase resulsts
	 * @param registry
	 * @return
	 * @throws Exception
	 */
	public Properties execute(Registry registry) throws Exception;
	
	/**
	 * Returns a title of the task
	 * @return
	 */
	public String getTitle();
	
}
